package com.nf.ch03.test06.one;

/**
 * @author lwj
 * @date 2025-03-04
 * @vesion 1.0.0
 */
public class SmartMobilephone extends Phone implements USB{
    // 构造方法
    public SmartMobilephone() {}
    public SmartMobilephone(String name) {
        super(name);
    }

    /**
     * 打电话
     */
    @Override
    public void ringUp() {
        System.out.println(this.getName()+"也可以打电话");
    }

    @Override
    public void Conn(Object obj) {
        Computer computer = (Computer) obj;
        computer.Conn(this.getClass().getClassLoader());
        System.out.println(this.getClass().getSimpleName());
    }

    @Override
    public void read() {
        System.out.println(this.getName()+"正在进行读操作");
    }

    @Override
    public void write() {
        System.out.println(this.getName()+"正在进行写操作");
    }
}
